package com.skywolf.chem.pageconfig.controller;


import com.skywolf.chem.common.sysconfig.response.RespData;
import com.skywolf.chem.pageconfig.entity.LoopImg;
import com.skywolf.chem.pageconfig.service.ILoopImgService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 轮播图配置表 前端控制器
 * </p>
 *
 * @author 
 * @since 2020-06-09
 */
@RestController
@RequestMapping("/ct/pageconfig/loop-img")
public class LoopImgController {

    @Autowired
    private ILoopImgService loopImgService;

    @ApiOperation(value = "获取轮播图-app调用")
    @RequestMapping(value = "/getLoopImg",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public RespData<LoopImg> getLoopImg(@RequestParam(value="imgPosition",required=false) String imgPosition) {
        List<LoopImg>  obj= loopImgService.getLoopImgList();
        return RespData.success(obj);
    }
}
